import upyun


#新建又拍云实例
up = upyun.UpYun('123123123123','test123456','ihw5JZsdxHD0PFVUqDsd2MFCQd4o8lIu')

#上传文件
# up.put('/upyun_test.txt','adfadsfadf\n你好你好你好\n')

#文件流操作（节省内存）

# with open('./md.png','rb') as f:
# 	#上传操作
# 	res = up.put('/upyun_test.png',f,checksum=True)

#目录操作
# up.mkdir('/upyun_test/')

#移动文件
# up.move('/upyun_test.png','/upyun_test/upyun_test.png')

#复制文件
#up.copy('/upyun_test.txt','/upyun_test/upyun_test1.txt')

#断点续传
# with open('c:/test.mp4','rb') as f:
# 	res = up.put('/upyun_test/test.mp4',f,checksum=True,need_resume=True

#下载文件
# res = up.get('/upyun_test.txt')

# print(res)

#删除文件
# up.delete('/upyun_test/upyun_test.png')

